#!/bin/sh
rm -rf /app/service/*\
&& sh /app/zookeeper-3.4.5/bin/zkServer.sh start\
&& cp /app/upload/*.jar /app/service/ && echo startingservice

java -jar /app/service/member-service.jar > /dev/null &
java -jar /app/service/cloudteach-service.jar  > /dev/null &
java -jar /app/service/openApi-service.jar  > /dev/null &
java -jar /app/service/pay-service.jar  > /dev/null &
java -jar /app/service/appCenter-service.jar  > /dev/null &
java -jar /app/service/notify-service.jar  > /dev/null &

echo startingsleep
sleep 1m \
&& echo startingtomcat

rm -rf /app/apache-tomcat-7.0.63/work/*
rm -rf /app/apache-tomcat-7.0.63/webapps/*\
&& cp /app/upload/*.war  /app/apache-tomcat-7.0.63/webapps/\
&& sh  /app/apache-tomcat-7.0.63/bin/startup.sh

#tail -f  /app/apache-tomcat-7.0.63/logs/catalina.out &
